package com.ruoyi.common.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;

import java.util.ArrayList;
import java.util.List;

public class Test {
    public static void  main(String s[]){
        List<Long> id=new ArrayList<Long>();
        id.add(1L);
        id.add(2L);
        String sss=JSON.toJSONString(id);
        System.out.println("sss==="+sss);
        List<Long> students = JSON.parseObject(sss,new TypeReference<List<Long>>(){}); // Json 转List
        System.out.println("sss==="+sss);

    }
}
